package com.cyxy.ojbackenduserservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyxy.ojbackendmodel.model.dto.user.UserQueryRequest;
import com.cyxy.ojbackendmodel.model.entity.User;
import com.cyxy.ojbackendmodel.model.vo.LoginUserVO;
import com.cyxy.ojbackendmodel.model.vo.UserVO;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

// 用户服务
public interface UserService extends IService<User> {

    //用户登录
    LoginUserVO userLogin(String userAccount, String userPassword, HttpServletRequest request);

    //用户注册
    long userRegister(String userAccount, String userName, String userPassword, String checkPassword);

    //用户注销
    boolean userLogout(HttpServletRequest request);

    //获取当前登录用户
    User getLoginUser(HttpServletRequest request);

    //获取脱敏的已登录用户信息
    LoginUserVO getLoginUserVO(User user);

    //获取脱敏的用户信息
    UserVO getUserVO(User user);

    //获取脱敏的用户信息
    List<UserVO> getUserVO(List<User> userList);

    //获取查询条件
    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);
}
